*Code to replicate Figures and appendix table for
** Doces, J., Goldberg, J., and Wolaver, A. 2021. Religion and Charitable Donations: Evidence from ***Africa, Journal for the Scientific Study of Religion


*Figure 2


logit donation_yes i.asked_heaven_hell i.country,r

coefplot,baselevels drop(_cons) headings(0.asked_heaven_hell = "{bf: Asked heaven/hell}" 0.country = "{bf:Country}", gap(0)) ///
coeflabels(0.asked_heaven_hell= "No" 1.asked_heaven_hell= "Yes" 0.country= "Ivory Coast" 1.Ghana="Ghana") ///
title("Figure 2. Effect of Asking Belief" "in Heaven and Hell on Donation", size(medium)) xline(0, lcolor(black)) 

*Figure 3

recode belief_heaven_hell (0/1=0) (2=1),gen(belief_v2)
label define belief_v2_lab 0 "No" 1 "Yes"
label values belief_v2 belief_v2_lab

logit donation_yes i.belief_v2 i.donation_price i.female_r i.education_r i.economic_r i.politic_r i.christian i.age_bracket_r i.country,r

coefplot,baselevels drop(_cons) coeflabels( ,notick labsize(small) labcolor(black)) ///
headings(0.belief_v2 = "{bf: Believe heaven/hell}" 0.donation_price="{bf:Donation Price}" 0.female_r="{bf:Gender}" ///
0.education_r="{bf:Education}" 0.economic_r="{bf:Economic Status}" 0.politic_r="{bf:Political Ideology}" 0.christian="{bf:Christian}" ///
0.age_bracket_r="{bf:Age Group}" 0.country="{bf:Location}", gap(1)) ///
title("Figure 3. Effect of Belief in Heaven and Hell on Donation", size(small)) xline(0, lcolor(black))

*Figure 4 

recode belief_v2 (0=1 "Does not/Does not know") (1=0 "Believes"),gen(belief_v3)

logit donation_yes i.donation_price#i.belief_v3 i.female_r i.education_r i.economic_r i.politic_r i.christian i.age_bracket_r i.country,r

coefplot, xline(0) baselevels keep(*.donation_price#*.belief_v3) coeflabels(0.donation_price#0.belief_v3="Does believe" 0.donation_price#1.belief_v3 ///
="Does not know/Does not believe" 1.donation_price#0.belief_v3 ="Does Believe" 1.donation_price#1.belief_v3 ="Does not know/Does not Believe" 2.donation_price#0.belief_v3="Does Believe" 2.donation_price#1.belief_v3="Does not know/Does not Believe",notick labsize(small) labcolor(black)) ///
headings(0.donation_price#0.belief_v3 = "{bf: Donation Price of 250 CFA}" 1.donation_price#0.belief_v3 = "{bf: Donation Price of 500 CFA}" ///
2.donation_price#0.belief_v3 = "{bf: Donation Price of 1000 CFA}") xline(0, lcolor(black)) ///
title("Figure 4. Belief in Heaven and Hell," "Donation Price, and Probability of Donation", size(medium)) ///
xtitle("Effect on Pr (Donation)", size(small))

*Tables in Appendix

**appendix table A1 The effect of experimental treatment on donation choice

logit donation_yes i.asked_heaven_hell i.country,r
outreg2 using Table_1.doc,title(Table 1. The Effect of Asking Heaven and Hell and Price on Donation Choice) nonote ///
addnote("Notes. Robust standard errors in parentheses.  Coefficients are logged odds. *** p<0.01, ** p<0.05, * p<0.10") ///
ctitle(Model 1) label replace


**appendix table A2 the effect of beliefs on donation choice

logit donation_yes i.belief_v2 i.donation_price i.female_r i.education_r i.economic_r i.politic_r i.christian i.age_bracket_r i.country,r

outreg2 using Table_2.doc,title(Table A2. The effect of beliefs on donation choice) nonote ///
addnote("Notes. Robust standard errors in parentheses.  Coefficients are logged odds. *** p<0.01, ** p<0.05, * p<0.10") ///
ctitle(Model 1) label replace

**appendix table A3 the effect of donation price & beliefs on donation choice

logit donation_yes i.donation_price#i.belief_v3 i.female_r i.education_r i.economic_r i.politic_r i.christian i.age_bracket_r i.country,r

outreg2 using Table_3.doc,title(Table A3. The effect of donation price & beliefs on donation choice) nonote ///
addnote("Notes. Robust standard errors in parentheses.  Coefficients are logged odds. *** p<0.01, ** p<0.05, * p<0.10") ///
ctitle(Model 1) label replace



